from fdfs_client.client import Fdfs_client# 创建fastdfs客户端 并指定它的配置文件fdsf_client = Fdfs_client('client.conf')ret = fdsf_client.upload_by_filename('/Users/chao/Desktop/01.jpeg')# f = open('/Users/chao/Desktop/01.jpeg')# content = f.read()# fdsf_client.upload_by_buffer(content)print(ret)"""<fdfs_client.connection.Connection object at 0x1050c0fd0><fdfs_client.fdfs_protol.Tracker_header object at 0x1050d9048>{'Group name': 'group1', 'Remote file_id': 'group1/M00/00/00/wKhn0l0r63mAXAcHAAC4j90Tziw83.jpeg', 'Status': 'Upload successed.', 'Local file name': '/Users/chao/Desktop/01.jpeg', 'Uploaded size': '46.00KB', 'Storage IP': '192.168.103.210'}"""